import request from '@/utils/request'

export default{
    //获取所有讲师
    getList(){
        return request({
            url:`/eduservice/teacher/findAll`,
            method:'get'
        })
    },

    //条件分页查询
    getTeacherListPage(current,size,teacherQuery){
        return request({
            url:`/eduservice/teacher/pageTeacherCondition/${current}/${size}`,
            data:teacherQuery,
            method:'post'
        })
    },

    //删除讲师
    deleteTeacherId(id){
        return request({
            url:`/eduservice/teacher/${id}`,
            method:'delete'
        })
    },

    //添加讲师
    saveTeacher(teacher){
        return request({
            url:`/eduservice/teacher/addTeacher`,
            method:'post',
            data:teacher
        })
    },

    //根据id查询讲师
    getTeacherInfo(id){
        return request({
            url:`/eduservice/teacher/${id}`,
            method:'get'
        })
    },

    //更新讲师信息
    updateTeacher(teacher){
        return request({
            url:'/eduservice/teacher/updateTeacher',
            method:'post',
            data:teacher
        })
    }


}